﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using CommonFactory;

namespace CharacterSystem
{
    public class CharacterSystemFacade:Singleton<CharacterSystemFacade>,IInitable,ICharacterManager
    {
        #region 管理器

        ICharacterManager characterManager = new CharacterManager();

        public void Init()
        {
            characterManager.Init();
        }

        public ICommonProductData GetCharacterDataByID(int id)
        {
            return characterManager.GetCharacterDataByID(id);
        }

        public CharacterBase CreateCharacter(int id)
        {
            return characterManager.CreateCharacter(id);
        }

        public void RegisterCharacterFactory(int id, CharacterFactoryBase factory)
        {
             characterManager.RegisterCharacterFactory(id, factory);
        }

        #endregion
    }
}